package com.handsome.工厂模式.抽象工厂模式.factory;


import com.handsome.工厂模式.抽象工厂模式.pizza.*;

/**
 * 简单工厂类
 * @author niechun
 * @date 2023/1/8 20:02
 */
public class LDPizzaFactory implements PizzaFactory{

    public Pizza createPizza(String orderType){

         Pizza pizza=null;
        if ("greek".equals(orderType)) {
            pizza = new LDGreekPizza("伦敦希腊披萨");
        } else if ("cheese".equals(orderType)) {
            pizza = new LDCheesePizza("伦敦奶酪披萨");
        }

        return pizza;
    }


}
